package data;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class VersionTable {
	
	public final static String AUDIT_VERSION = "auditVersion"; 
	public final static String STATUS_CHANGE__VERSION = "statusVersion"; 
	
	private Map<String, Long> versionMap;
	
	private static VersionTable versionTable;
	
	private VersionTable(){
		versionMap = new ConcurrentHashMap<String, Long>();
	}
	
	public static VersionTable getInstance(){
		if (versionTable==null) {
			synchronized (VersionTable.class) {
				if (versionTable==null) {
					versionTable = new VersionTable();
				}
			}
		}
		return versionTable;
	}
	
	public void put(String name,Long version){
		versionMap.put(name, version);
	}
	
	public Long get(String name){
		return versionMap.get(name);
	}
	

}
